import { createRouter, createWebHashHistory } from "vue-router"
const router = createRouter({
	history: createWebHashHistory(),
	routes: [{
			path: "/",
			redirect: "/home",
		},
		{
			path:'/home',
			component:()=>import("../views/Home.vue"),
			meta:{
				index:1,
			}
		},
		{
			path:"/person",
			component:()=>import("../views/Person.vue"),
			meta:{
				index:1,
			}
		},
		{
			path: "/login",
			component:()=>import("../views/Login.vue"),
			meta:{
				index:1,
			}
		},
		{
			path:"/cart",
			component:()=>import ("@/views/Cart.vue"),
			meta:{
				index:1,
			}
			
		},
		{
			path:"/category",
			component:()=>import ("@/views/Category.vue"),
			meta:{
				index:1,
			}
		},
		{
			path:"/address",
			component:()=>import ("@/views/Address.vue"),
			meta:{
				index:2,
			}
		},
		{
			path:"/product-list",
			component: ()=> import ("@/views/ProductList.vue"),
			meta:{
				index:2,
			},
		},
		{
			path:"/create-order",
			component:()=>import("@/views/CreateOrder.vue"),
			meta: {
				index:3,
			}
		},
		{
			path:"/addressForm",
			component:()=>import ("@/views/AddressForm.vue"),
			meta:{
				index:3,
			},
		},
		{
			path:"/product/:id",
			component: ()=>import ("@/views/ProductDetails.vue"),
			meta: {
				index: 3,
			}
		},
		{
			path:"/my-order",
			component:()=>import("@/views/MyOrder.vue"),
			meta: {
				index:4,
			}
		},
		{
			path:"/order-details",
			component:() => import ("@/views/OrderDetails.vue"),
			meta:{
				index:5,
			}
		},
	
	],
	// routes: [{
	// 	path:'/',
	// 	redirect:'/home',
	// },F
	// {
	// 		path:'/home',
	// 		component: ()=>import('@/views/Home.vue'),
	// 		meta: {
	// 			index: 1,
	// 		}
	// },
	// {
	// 		path:'/login',
	// 		component: ()=>import('@/views/Login.vue'),
	// 		meta: {
	// 			index: 1,
	// 		}
	// }]
});
export default router;